home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 17 / CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso / CUCD / Programming / DiceSource / include / fcntl.h < prev    next >
C/C++ Source or Header  |  1997-09-09  |  1KB  |  74 lines

  1.  
  2. /*
  3.  * $VER: fcntl.h 1.0 (17.4.93)
  4.  *
  5.  * (c)Copyright 1992 Obvious Implementations Corp, All Rights Reserved
  6.  */
  7.  
  8. #ifndef FCNTL_H
  9. #define FCNTL_H
  10.  
  11. #define O_RDONLY    0
  12. #define O_WRONLY    1
  13. #define O_RDWR        2
  14. #define O_NDELAY    4
  15. #define O_APPEND    8
  16. #define O_CREAT     0x0100
  17. #define O_TRUNC     0x0200
  18. #define O_EXCL        0x0400
  19. #define O_BINARY    0x0800
  20.  
  21. /*
  22.  *  Internal, never specify
  23.  */
  24.  
  25. #define O_INTERNAL  0xF000
  26. #define O_ISOPEN    0x1000
  27. #define O_NOCLOSE   0x2000  /*    not a closable file */
  28. #define O_CEXEC     0x4000  /*    close on exec        */
  29.  
  30. /*
  31.  *  UNIX support
  32.  */
  33.  
  34. #define F_DUPFD     1
  35. #define F_GETFD     2
  36. #define F_SETFD     3
  37. #define F_GETFL     4
  38. #define F_SETFL     5
  39. #define FNDELAY     0x00010000
  40.  
  41. #define L_SET        0
  42. #define L_CUR        1
  43. #define L_END        2
  44.  
  45.  
  46. extern int write(int, const void *, unsigned int);
  47. extern int read(int, void *, unsigned int);
  48. extern int close(int);
  49. extern int open(const char *, int, ...);
  50. extern int creat(const char *, int);
  51. extern long lseek(int, long, int);
  52.  
  53. extern void *fdtofh(int);
  54.  
  55. #ifdef STDIO_H
  56. extern _IOFDS *__getfh(int);        /*    for system use only */
  57. extern _IOFDS *_MakeFD(int *);        /*    for system use only */
  58. #endif
  59.  
  60. /*
  61.  *  UNIX
  62.  */
  63.  
  64. extern int fcntl(int, int, int);
  65. extern int isatty(int);
  66. extern int access(const char *, int);
  67.  
  68. #define F_OK    0
  69. #define X_OK    1
  70. #define W_OK    2
  71. #define R_OK    4
  72.  
  73. #endif
  74.